package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.DmcCsunHumidistatDataMapper;
import com.csun.cmny.provider.model.domain.DmcCsunHumidistatData;
import com.csun.cmny.provider.service.DmcCsunHumidistatDataService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-12-30 19:58
 * @Description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DmcCsunHumidistatDataServiceImpl extends BaseService<DmcCsunHumidistatData> implements DmcCsunHumidistatDataService {

    @Resource
    private DmcCsunHumidistatDataMapper dmcCsunHumidistatDataMapper;

    /**
     * save or update dmc csun humidistat date
     *
     * @param dmcCsunHumidistatData the dmc csun humidistat data
     *
     * @return the int.
     */
    @Override
    public Integer saveOrUpdate(DmcCsunHumidistatData dmcCsunHumidistatData) {

        return dmcCsunHumidistatDataMapper.saveOrUpdate(dmcCsunHumidistatData);
    }

    /**
     * delete by device id list
     *
     * @param deviceIds    the device id list
     *
     * @return  the int
     */
    @Override
    public Integer deleteByDeviceIds(List<Long> deviceIds) {

        return dmcCsunHumidistatDataMapper.deleteByDeviceIds(deviceIds);
    }
}
